package com.jiangwh.dao.client.impl;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.security.crypto.codec.Base64;
import org.springframework.stereotype.Service;

import com.jiangwh.dao.client.SAMClient;

@Service("samClient")
public class SAMClinetImpl implements SAMClient {

//	@Autowired
//	SamServicePortType portType;
//	
//	@Autowired
//	SelfServiceWebServicePortType type;

	@Override
	@Cacheable(value="liveforever",key="#userName + 'headLogin'")
	public String headLogin(String userName, String password) {
		System.out.println("call dao ....");
		return new String(Base64.encode((userName+":"+password).getBytes()));
	}
}
